const path = require('path')
const { BrowserWindow, app } = require('electron')
const { window } = require('./package.json')

process.env['ELECTRON_DISABLE_SECURITY_WARNINGS'] = 'true'

app.on('ready', () => {
  const _BrowserWindow = new BrowserWindow(window)
  if (process.env.NODE_ENV === 'development') {
    _BrowserWindow.loadURL('http://localhost:9292/')
  } else {
    _BrowserWindow.loadFile('./dist/index.html')
  }
})
